//框架层
package FactorMethod.framework;

public abstract class Factory {
    public final Product create(String owener){//create模板方法
        Product p=createProduct(owener);
        registerProduct(p);
        return p;
    }
    //抽象方法
    protected abstract Product createProduct(String owner);
    protected abstract void registerProduct(Product product);
}
